import globals from "globals";
import pluginJs from "@eslint/js";
import tseslint from "typescript-eslint";
import pluginVue from "eslint-plugin-vue";

export default [
  { files: ["**/*.{js,mjs,cjs,ts,vue}"] },
  { languageOptions: { globals: globals.browser } },
  // JavaScript
  pluginJs.configs.recommended,
  // TypeScript
  ...tseslint.configs.recommended,
  // Vue
  ...pluginVue.configs["flat/essential"],
  {
    files: ["**/*.vue"],
    languageOptions: { parserOptions: { parser: tseslint.parser } }
  },
  // ignore
  {
    ignores: [
      "dist",
      "public",
      "build",
      "babel.config.js",
      "eslint.config.js",
      "package.json",
      "node_modules"
    ]
  }
];
